package cn.da.shuai.cool.ai.search.client.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;
import dev.langchain4j.service.spring.AiServiceWiringMode;
import reactor.core.publisher.Flux;

@AiService(
        wiringMode = AiServiceWiringMode.EXPLICIT ,
        chatMemoryProvider = "chatMemoryProvider",
//        chatModel = "ollamaChatModel",
        chatModel = "qwenChatModel",
        streamingChatModel = "qwenStreamingChatModel",
        contentRetriever = "contentRetriever",
        tools = {"userTool"}
)
public interface Assistant {

    @UserMessage("{{it}}")
    @SystemMessage(fromResource = "system.txt")
    Flux<String> chat(@MemoryId int memoryId, @V("it") String prompt);
}
